home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / INFO / 401BUGS.ZIP / 32MEG.ASM < prev    next >
Assembly Source File  |  1991-06-05  |  1KB  |  49 lines

  1. FILELEN         equ     40000
  2. BUFSIZE         equ     2000                           ;Magic equate
  3. BUFCNT          equ     (FILELEN/BUFSIZE+1)*1024
  4.  
  5. assume          cs:ms_test, ds:ms_test, es:ms_test
  6.  
  7. ms_test         segment byte
  8.  
  9.                 org     100h
  10.  
  11. start:
  12.                 mov     ah, 03Ch
  13.                 push    cs
  14.                 pop     ds
  15.                 mov     dx, OFFSET filename
  16.                 mov     cx, 0
  17.                 int     21h                             ;Open file
  18.  
  19.                 mov     [ handle ], ax
  20.  
  21.                 mov     cx, BUFCNT
  22.  
  23. write_loop:
  24.                 push    cx
  25.  
  26.                 mov     ah, 40h
  27.                 push    cs
  28.                 pop     ds
  29.                 mov     dx, OFFSET filename
  30.                 mov     cx, BUFSIZE
  31.                 mov     bx, [ handle ]
  32.                 int     21h
  33.  
  34.                 pop     cx
  35.  
  36.                 loop    write_loop
  37.  
  38.                 mov     ah, 03Eh
  39.                 mov     bx, [ handle ]
  40.                 int     21h
  41.  
  42.                 int     20h
  43.  
  44. handle          dw      ?
  45. filename        db      '32MEG.DAT', 0
  46.  
  47. ms_test         ends
  48. end             start
  49.